package com.fare.taluo.ftp;

import java.io.IOException;

import com.fare.taluo.ftp.exception.FTPDownloadException;
import com.fare.taluo.ftp.exception.FTPUploadException;

public interface FTPService {
	/**
	 * 下载远程文件到本地目录中
	 * @param remoteFile 远程文件
	 * @param localDir 本地目录
	 * @return {@link #DownloadStatus}下载状态
	 * @throws IOException
	 */
	public DownloadStatus downloadFile(String[] remoteFile, String localDir) throws FTPDownloadException;
	/**
	 * 将远程服务器上指定目录下的文件下载到本地目录中
	 * @param remoteDir 远程目录
	 * @param localDir 远地目录
	 * @return {@link #DownloadStatus}下载状态
	 * @throws IOException
	 */
	public DownloadStatus downloadFilesInDir(String remoteDir, String localDir) throws FTPDownloadException;
	/**
	 * 将本地文件上传至远程服务器指定目录下
	 * @param localFile 
	 * @param remoteDir
	 * @return {@link #UploadStatus}上传状态
	 * @throws IOException
	 */
	public UploadStatus uploadFile(String[] localFile, String remoteDir) throws FTPUploadException;
	/**
	 * 关闭资源
	 */
	public void disconnect() throws Exception;
}
